home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / Text Capture FKEY / My_StdText.c < prev    next >
C/C++ Source or Header  |  1992-06-12  |  577b  |  33 lines

  1. #include "defs.h"
  2.  
  3. #define        CHECKPOINTS    0
  4. #include "debug.h"
  5.  
  6. pascal void My_StdText( short byteCnt, Ptr textAddr,
  7.                         Point numerPt, Point denomPt )
  8. {
  9.     GrafPtr            save_port;
  10.     
  11.     asm {
  12.         movem.l    a0-a5/d0-d7, -(SP)    ; save registers
  13.         LEA        main, A4            ; for addressing global variables
  14.     }
  15.     CKPT("My_StdText start");
  16.     
  17.     if (byteCnt > 0)
  18.     {
  19.         GetPort( &save_port );
  20.         SetPort( text_port );
  21.         
  22.         (*Copy_text)( byteCnt, textAddr );
  23.     
  24.         SetPort( save_port );
  25.     }
  26.     (*Old_StdText)( byteCnt, textAddr, numerPt, denomPt );
  27.  
  28.     CKPT("My_StdText end");
  29.     asm {
  30.         movem.l    (SP)+, a0-a5/d0-d7
  31.     }
  32. }
  33.